export default {
  created() {
    this.getRightsData();
  },
  data() {
    return {
      rightList: []
    };
  },
  methods: {
    async getRightsData() {
      const {
        data: { data, meta }
      } = await this.$http.get("rights/list");
      if (meta.status !== 200) return this.$message.error(meta.msg);
      this.$message.success(meta.msg);
      this.rightList = data;
    }
  }
};
